#!/bin/ksh
#
# name: ossec
# purpose: Init script for ossec-hids
# Aug. 07 2008 Chris Cuevas
#

case "$1" in
start)
    if [ -f /var/ossec/bin/ossec-control ]; then
        echo "Starting OSSEC"
        /var/ossec/bin/ossec-control start
    fi
    ;;
stop)
    if [ -f /var/ossec/bin/ossec-control ]; then
        echo "Stopping OSSEC"
        /var/ossec/bin/ossec-control stop
    fi
    ;;
status)
    if [ -f /var/ossec/bin/ossec-control ]; then
        /var/ossec/bin/ossec-control status
    fi
    ;;
*)
    echo "Usage: $0 (start | stop | status)"
    exit 1
esac
